<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>public/assets/css/h5/service.css">

<div class="topSide">
<!--未登录-->
<?php if(!$is_login){?>
    <a style="color: #fff;" class="login weui_btn weui_btn_default" href="<?php echo base_url()?>login">绑定手机登录</a>
<?php }else{?>
<!--已登陆-->
    <a href="javascript:void(0);" class="weui_media_box weui_media_appmsg">
        <div class="weui_media_hd">
            <img class="weui_media_appmsg_thumb" src="<?php echo isset($info['wx_avatar']) ? $info['wx_avatar'] :$info['avatar']?>" alt="">
        </div>
        <div class="weui_media_bd">
            <h4 class="weui_media_title"><?php echo isset($info['wx_nick_name']) ? $info['wx_nick_name'] :$info['name']?></h4>
            <p class="weui_media_desc"><?php echo isset($info['login_mobile']) ? $info['login_mobile'] :$info['mobile']?></p>
        </div>
    </a>
<?php }?>    
</div>
<?php if($is_login && $this->_is_teacher){?>
<section id="teacher" style="padding: 10px 2%; border-bottom: 1px solid #ccc; ">
    <!--只有老师可以修改上课时间-->
    <span><i class="fa fa-edit"></i></span>
    <span>修改上课时段</span>
    <span><i class="fa fa-chevron-right"></i></span>
</section>
<?php }?>
<section id="about" style="padding: 10px 2%; border-bottom: 1px solid #ccc; ">
    <span><i class="fa fa-group"></i></span>
    <span>关于我们</span>
    <span><i class="fa fa-chevron-right"><a></a></i></span>
</section>
<section id="process" style="padding: 10px 2%; border-bottom: 1px solid #ccc; ">
    <span><i class="fa fa-file-text-o"></i></span>
    <span>服务流程</span>
    <span><i class="fa fa-chevron-right"></i></span>
</section>
<section id="feedback" style="padding: 10px 2%; border-bottom: 1px solid #ccc; ">
    <span><i class="fa fa-pencil-square-o"></i></span>
    <span>意见反馈</span>
    <span><i class="fa fa-chevron-right"></i></span>
</section>
<section id="call" style="padding: 10px 2%; border-bottom: 1px solid #ccc; ">
    <span><i class="fa fa-phone"></i></span>
    <span>联系客服&nbsp;&nbsp;<a href="javascript:void(0);" style="color:black;">400-888-888</a></span>
    <span><i class="fa fa-chevron-right"></i></span>
</section>
<br>
<?php if($is_login){?>
<a id="quit" href="javascript:void(0);" class="login weui_btn weui_btn_default" >退出登录</a>
<?php }?>
<!--打电话对话框-->
<div class="weui_dialog_confirm" id="dialog1" style="display: none;">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title"><a style="color:black;" href="javascript:void(0);">400-888-8888</a></strong></div>
        
        <div class="weui_dialog_ft">
            <a href="javascript:void(0);" class="weui_btn_dialog default">取消</a>
            <a href="tel:400-888-888"  class="weui_btn_dialog primary">呼叫</a>
        </div>
    </div>
</div>
<div class="weui_dialog_confirm" id="dialog2" style="display: none;">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">您确定要退出登录吗？</strong></div>
        
        <div class="weui_dialog_ft">
            <a href="javascript:void(0);" class="weui_btn_dialog default">取消</a>
            <a href="<?php echo base_url()?>login/logout?uid=<?php echo $info['id'];?>"  class="weui_btn_dialog primary">退出</a>
        </div>
    </div>
</div>
<!--退出对话框-->
<script type="text/javascript">
   $(document).ready(function(){
        $("#call").click(function(){
            $("#dialog1").show();
        });
        $("#quit").click(function(){
            $("#dialog2").show();
        });
        $(".weui_dialog_confirm .default").click(function(){
            $(this).parents(".weui_dialog_confirm").hide();
        });

        $("#about").click(function(){
            location.href='<?php echo base_url()?>service/about';
        });

        $("#process").click(function(){
        	location.href='<?php echo base_url()?>service/process';
        });

        $("#feedback").click(function(){
        	location.href='<?php echo base_url()?>feedback/index';
        });
        
        $("#teacher").click(function(){
        	location.href='<?php echo base_url()?>teacher/updatetime';
        });
   });
</script> 